
## Created by Anjuta
## modified by Edgar Pereira
## Nº 6207

CC = gcc
CFLAGS = -g -Wall
OBJECTS = crebides.o\
crebides_wrap.o\
myDataProcessing.o

INCFLAGS = -I/usr/include/python2.6

LDFLAGS =
LIBS = -lsqlite3

all: _crebides.so

crebides_wrap.c: crebides.i
	swig -python crebides.i
        
crebides_wrap.o: crebides_wrap.c
	$(CC) -c -o crebides_wrap.o crebides_wrap.c $(INCFLAGS)

crebides.o: crebides.c
	$(CC) -c -o crebides.o crebides.c $(INCFLAGS)
	
myDataProcessing.o: myDataProcessing.c
	$(CC) -c -o myDataProcessing.o myDataProcessing.c $(INCFLAGS)
        
_crebides.so: $(OBJECTS)
	ld -o _crebides.so $(OBJECTS) $(LDFLAGS) $(LIBS) -shared

.SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o

.c.o :
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o

.PHONY: all
.PHONY: count
.PHONY: clean
